package ru.mipt.victator.pagerank.index;

import java.io.IOException;

import org.apache.hadoop.fs.FSDataInputStream;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;

public class FSFile2String
{
	public static String Read(FileSystem FS, Path file) throws IOException
	{
		FSDataInputStream FSdis = FS.open( file );
		byte[] data = new byte[FSdis.available()];
		FSdis.read(data);
		FSdis.close();
		return new String(data,"UTF-8");
	}
}
